#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

#define OFFSET(type,mem) (size_t)&(((type*)0)->mem)
struct S
{
	char c1;
	int i;
	char c2;
};
int main()
{
	printf("%d\n", OFFSET(struct S, c1));
	printf("%d\n", OFFSET(struct S, i));
	printf("%d\n", OFFSET(struct S, c2));
	return 0;
}